const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
  return sequelize.define('act_de_databasechangelog', {
    id: {
      type: DataTypes.STRING(255),
      allowNull: false,
      primaryKey: true,
      field: 'ID'
    },
    author: {
      type: DataTypes.STRING(255),
      allowNull: false,
      field: 'AUTHOR'
    },
    filename: {
      type: DataTypes.STRING(255),
      allowNull: false,
      field: 'FILENAME'
    },
    dateexecuted: {
      type: DataTypes.DATE,
      allowNull: false,
      field: 'DATEEXECUTED'
    },
    orderexecuted: {
      type: DataTypes.INTEGER,
      allowNull: false,
      field: 'ORDEREXECUTED'
    },
    exectype: {
      type: DataTypes.STRING(10),
      allowNull: false,
      field: 'EXECTYPE'
    },
    md5Sum: {
      type: DataTypes.STRING(35),
      allowNull: true,
      field: 'MD5SUM'
    },
    description: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'DESCRIPTION'
    },
    comments: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'COMMENTS'
    },
    tag: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'TAG'
    },
    liquibase: {
      type: DataTypes.STRING(20),
      allowNull: true,
      field: 'LIQUIBASE'
    },
    contexts: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'CONTEXTS'
    },
    labels: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'LABELS'
    },
    deploymentId: {
      type: DataTypes.STRING(10),
      allowNull: true,
      field: 'DEPLOYMENT_ID'
    }
  }, {
    sequelize,
    tableName: 'act_de_databasechangelog',
    timestamps: false
  });
};
